<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>jQuery Mobile Select Events Test Suite</title>

	<script src="../../../external/requirejs/require.js"></script>
	<script src="../../../js/requirejs.config.js"></script>
	<script src="../../../js/jquery.tag.inserter.js"></script>
	<script src="../../jquery.setNameSpace.js"></script>
	<script src="../../../external/qunit.js"></script>
	<script src="../../../tests/jquery.testHelper.js"></script>
	<script>
		$.testHelper.asyncLoad([
			[
				"widgets/forms/select",
				"widgets/forms/select.custom",
				"defineKeepNative.js"
			],
			[ "jquery.mobile.init" ],
			[
				"select_events.js",
				"select_native.js",
				"select_core.js"
			]
		]);
	</script>

	<link rel="stylesheet"  href="../../../css/themes/default/jquery.mobile.css"/>
	<link rel="stylesheet" href="../../../external/qunit.css"/>

	<script src="../../swarminject.js"></script>
</head>
<body>

<div id="qunit"></div>

<div id="default"  data-nstest-role="page" data-nstest-theme="c">
	<div  data-nstest-role="fieldcontain" id="select-choice-few-container">
		<select name="select-choice-few" id="select-choice-few" data-nstest-native-menu="false">
			<option value="standard">Standard: 7 day</option>
			<option value="rush">Rush: 3 days</option>
			<option value="express">Express: next day</option>
			<option value="overnight">Overnight</option>
		</select>
	</div>

	<div  data-nstest-role="fieldcontain" id="native-select-choice-few-container">
	  <label for="native-select-choice-few" class="select">Choose shipping method:</label>
		<select name="native-select-choice-few" id="native-select-choice-few" data-nstest-native-menu="true">
			<option value="standard">Standard: 7 day</option>
			<option value="rush">Rush: 3 days</option>
			<option value="express">Express: next day</option>
			<option value="overnight">Overnight</option>
		</select>
	</div>

	<div  data-nstest-role="fieldcontain" id="select-choice-native-container">
		<select name="select-choice-native" id="select-choice-native" data-nstest-native-menu="true">
			<option value="standard">Standard: 7 day</option>
			<option value="rush">Rush: 3 days</option>
			<option value="express">Express: next day</option>
			<option value="overnight">Overnight</option>
		</select>
	</div>

	<div  data-nstest-role="fieldcontain" id="select-choice-global-native-container">
		<select name="select-choice-global-native" id="select-choice-global-native"  data-nstest-native-menu="false">
			<option value="standard">Standard: 7 day</option>
			<option value="rush">Rush: 3 days</option>
			<option value="express">Express: next day</option>
			<option value="overnight">Overnight</option>
		</select>
	</div>

	<div data-nstest-role="fieldcontain" id="select-choice-focus-test">
		<select name="select-choice-focus-test" id="select-choice-focus-test"  data-nstest-native-menu="false">
			<option value="standard">Standard: 7 day</option>
			<option value="rush">Rush: 3 days</option>
			<option value="express">Express: next day</option>
			<option value="overnight">Overnight</option>
		</select>
	</div>

	<div data-nstest-role="fieldcontain" id="select-choice-menu-focus-test">
		<select name="select-choice-menu-focus-test" id="select-choice-menu-focus-test"  data-nstest-native-menu="false">
			<option value="standard">Standard: 7 day</option>
			<option value="rush">Rush: 3 days</option>
			<option value="express">Express: next day</option>
			<option value="overnight">Overnight</option>
		</select>
	</div>

	<div data-nstest-role="popup" id="popup-containing-select">
		<select name="select-choice-inside-popup" id="select-choice-inside-popup" data-nstest-native-menu="false">
			<option value="abracadabra">Abracadabra</option>
			<option value="simsalabim">Simsalabim</option>
			<option value="csiribu-csiriba">Csiribu-Csiriba</option>
		</select>
	</div>

	<div  data-nstest-role="fieldcontain" id="select-choice-many-container-1">
		<label for="select-choice-many-1" class="select">Your state:</label>
		<select name="select-choice-many-1" id="select-choice-many-1" data-nstest-native-menu="false">
			<option value="AL">Alabama</option>
			<option value="AK">Alaska</option>
			<option value="AZ">Arizona</option>
			<option value="AR">Arkansas</option>
			<option value="CA">California</option>
			<option value="CO">Colorado</option>
			<option value="CT">Connecticut</option>
			<option value="DE">Delaware</option>
			<option value="FL">Florida</option>
			<option value="GA">Georgia</option>
			<option value="HI">Hawaii</option>
			<option value="ID">Idaho</option>
			<option value="IL">Illinois</option>
			<option value="IN">Indiana</option>
			<option value="IA">Iowa</option>
			<option value="KS">Kansas</option>
			<option value="KY">Kentucky</option>
			<option value="LA">Louisiana</option>
			<option value="ME">Maine</option>
			<option value="MD">Maryland</option>
			<option value="MA">Massachusetts</option>
			<option value="MI">Michigan</option>
			<option value="MN">Minnesota</option>
			<option value="MS">Mississippi</option>
			<option value="MO">Missouri</option>
			<option value="MT">Montana</option>
			<option value="NE">Nebraska</option>
			<option value="NV">Nevada</option>
			<option value="NH">New Hampshire</option>
			<option value="NJ">New Jersey</option>
			<option value="NM">New Mexico</option>
			<option value="NY">New York</option>
			<option value="NC">North Carolina</option>
			<option value="ND">North Dakota</option>
			<option value="OH">Ohio</option>
			<option value="OK">Oklahoma</option>
			<option value="OR">Oregon</option>
			<option value="PA">Pennsylvania</option>
			<option value="RI">Rhode Island</option>
			<option value="SC">South Carolina</option>
			<option value="SD">South Dakota</option>
			<option value="TN">Tennessee</option>
			<option value="TX">Texas</option>
			<option value="UT">Utah</option>
			<option value="VT">Vermont</option>
			<option value="VA">Virginia</option>
			<option value="WA">Washington</option>
			<option value="WV">West Virginia</option>
			<option value="WI">Wisconsin</option>
			<option value="WY">Wyoming</option>
		</select>
	</div>

	<div  data-nstest-role="fieldcontain" id="select-choice-many-container">
		<label for="select-choice-many" class="select">Your state:</label>
		<select name="select-choice-many" id="select-choice-many" data-nstest-native-menu="false">
			<option value="AL">Alabama</option>
			<option value="AK">Alaska</option>
			<option value="AZ">Arizona</option>
			<option value="AR">Arkansas</option>
			<option value="CA">California</option>
			<option value="CO">Colorado</option>
			<option value="CT">Connecticut</option>
			<option value="DE">Delaware</option>
			<option value="FL">Florida</option>
			<option value="GA">Georgia</option>
			<option value="HI">Hawaii</option>
			<option value="ID">Idaho</option>
			<option value="IL">Illinois</option>
			<option value="IN">Indiana</option>
			<option value="IA">Iowa</option>
			<option value="KS">Kansas</option>
			<option value="KY">Kentucky</option>
			<option value="LA">Louisiana</option>
			<option value="ME">Maine</option>
			<option value="MD">Maryland</option>
			<option value="MA">Massachusetts</option>
			<option value="MI">Michigan</option>
			<option value="MN">Minnesota</option>
			<option value="MS">Mississippi</option>
			<option value="MO">Missouri</option>
			<option value="MT">Montana</option>
			<option value="NE">Nebraska</option>
			<option value="NV">Nevada</option>
			<option value="NH">New Hampshire</option>
			<option value="NJ">New Jersey</option>
			<option value="NM">New Mexico</option>
			<option value="NY">New York</option>
			<option value="NC">North Carolina</option>
			<option value="ND">North Dakota</option>
			<option value="OH">Ohio</option>
			<option value="OK">Oklahoma</option>
			<option value="OR">Oregon</option>
			<option value="PA">Pennsylvania</option>
			<option value="RI">Rhode Island</option>
			<option value="SC">South Carolina</option>
			<option value="SD">South Dakota</option>
			<option value="TN">Tennessee</option>
			<option value="TX">Texas</option>
			<option value="UT">Utah</option>
			<option value="VT">Vermont</option>
			<option value="VA">Virginia</option>
			<option value="WA">Washington</option>
			<option value="WV">West Virginia</option>
			<option value="WI">Wisconsin</option>
			<option value="WY">Wyoming</option>
		</select>
	</div>

	<div  data-nstest-role="fieldcontain" id="select-choice-many-container-hash-check">
		<label for="select-choice-many-hash-check" class="select">Your state:</label>
		<select name="select-choice-many-hash-check" id="select-choice-many-hash-check"  data-nstest-native-menu="false">
			<option value="AL">Alabama</option>
			<option value="AK">Alaska</option>
			<option value="AZ">Arizona</option>
			<option value="AR">Arkansas</option>
			<option value="CA">California</option>
			<option value="CO">Colorado</option>
			<option value="CT">Connecticut</option>
			<option value="DE">Delaware</option>
			<option value="FL">Florida</option>
			<option value="GA">Georgia</option>
			<option value="HI">Hawaii</option>
			<option value="ID">Idaho</option>
			<option value="IL">Illinois</option>
			<option value="IN">Indiana</option>
			<option value="IA">Iowa</option>
			<option value="KS">Kansas</option>
			<option value="KY">Kentucky</option>
			<option value="LA">Louisiana</option>
			<option value="ME">Maine</option>
			<option value="MD">Maryland</option>
			<option value="MA">Massachusetts</option>
			<option value="MI">Michigan</option>
			<option value="MN">Minnesota</option>
			<option value="MS">Mississippi</option>
			<option value="MO">Missouri</option>
			<option value="MT">Montana</option>
			<option value="NE">Nebraska</option>
			<option value="NV">Nevada</option>
			<option value="NH">New Hampshire</option>
			<option value="NJ">New Jersey</option>
			<option value="NM">New Mexico</option>
			<option value="NY">New York</option>
			<option value="NC">North Carolina</option>
			<option value="ND">North Dakota</option>
			<option value="OH">Ohio</option>
			<option value="OK">Oklahoma</option>
			<option value="OR">Oregon</option>
			<option value="PA">Pennsylvania</option>
			<option value="RI">Rhode Island</option>
			<option value="SC">South Carolina</option>
			<option value="SD">South Dakota</option>
			<option value="TN">Tennessee</option>
			<option value="TX">Texas</option>
			<option value="UT">Utah</option>
			<option value="VT">Vermont</option>
			<option value="VA">Virginia</option>
			<option value="WA">Washington</option>
			<option value="WV">West Virginia</option>
			<option value="WI">Wisconsin</option>
			<option value="WY">Wyoming</option>
		</select>
	</div>

	<div data-nstest-role="fieldcontain" id="select-choice-many-container-many-clicks">
		<label for="select-choice-many-many-clicks" class="select">Your state:</label>
		<select name="select-choice-many-many-clicks" id="select-choice-many-many-clicks"  data-nstest-native-menu="false">
			<option value="AL">Alabama</option>
			<option value="AK">Alaska</option>
			<option value="AZ">Arizona</option>
			<option value="AR">Arkansas</option>
			<option value="CA">California</option>
			<option value="CO">Colorado</option>
			<option value="CT">Connecticut</option>
			<option value="DE">Delaware</option>
			<option value="FL">Florida</option>
			<option value="GA">Georgia</option>
			<option value="HI">Hawaii</option>
			<option value="ID">Idaho</option>
			<option value="IL">Illinois</option>
			<option value="IN">Indiana</option>
			<option value="IA">Iowa</option>
			<option value="KS">Kansas</option>
			<option value="KY">Kentucky</option>
			<option value="LA">Louisiana</option>
			<option value="ME">Maine</option>
			<option value="MD">Maryland</option>
			<option value="MA">Massachusetts</option>
			<option value="MI">Michigan</option>
			<option value="MN">Minnesota</option>
			<option value="MS">Mississippi</option>
			<option value="MO">Missouri</option>
			<option value="MT">Montana</option>
			<option value="NE">Nebraska</option>
			<option value="NV">Nevada</option>
			<option value="NH">New Hampshire</option>
			<option value="NJ">New Jersey</option>
			<option value="NM">New Mexico</option>
			<option value="NY">New York</option>
			<option value="NC">North Carolina</option>
			<option value="ND">North Dakota</option>
			<option value="OH">Ohio</option>
			<option value="OK">Oklahoma</option>
			<option value="OR">Oregon</option>
			<option value="PA">Pennsylvania</option>
			<option value="RI">Rhode Island</option>
			<option value="SC">South Carolina</option>
			<option value="SD">South Dakota</option>
			<option value="TN">Tennessee</option>
			<option value="TX">Texas</option>
			<option value="UT">Utah</option>
			<option value="VT">Vermont</option>
			<option value="VA">Virginia</option>
			<option value="WA">Washington</option>
			<option value="WV">West Virginia</option>
			<option value="WI">Wisconsin</option>
			<option value="WY">Wyoming</option>
		</select>
	</div>

	<div data-nstest-role="fieldcontain" id="select-offscreen-container">
		<style>
			/* keep the select small and close to the screen border to test rendering */
			#select-offscreen-container {
			width: 100px;
			position: absolute;
			left: 0px;
			top: 0px;
			}
		</style>

		<select name="select-choice-few" id="select-offscreen" data-nstest-native-menu="false">
			<option value="standard">Standard: 7 day</option>
			<option value="rush">Rush: 3 days</option>
			<option value="express">Express: next day</option>
			<option value="overnight">Overnight</option>
		</select>
	</div>

	<div data-nstest-role="fieldcontain" id="select-long-option-label-container">
		<select name="select-long-option-label" id="select-long-option-label" data-nstest-native-menu="false">
			<option value="short">Choice 1</option>
			<option value="long">Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</option>
	    </select>
	</div>

  <select name="native-refresh" id="native-refresh">
    <option value="-1">default</option>
    <option value="-1">other</option>
  </select>

  <select name="custom-refresh" id="custom-refresh" data-nstest-native-menu="false">
    <option value="-1">default</option>
  </select>

  <select name="custom-refresh-opts-list" id="custom-refresh-opts-list" data-nstest-native-menu="false">
    <option value="-1">default</option>
  </select>

  <select name="non-parent-themed" id="non-parent-themed" data-nstest-native-menu="false" data-nstest-theme="a">
    <option value="-1">default</option>
  </select>

  <select name="parent-themed" id="parent-themed" data-nstest-native-menu="false">
    <option value="-1">default</option>
  </select>

  <select name="encoded-option" id="encoded-option" data-nstest-native-menu="false">
    <option>&lt;script&gt;window.encodedValueIsDefined = true;&lt;/script&gt;</option>
  </select>

  <select name="keep-native" id="keep-native" class="should-be-native">
    <option></option>
  </select>

	<div data-nstest-role="fieldcontain" id="optgroup-and-placeholder-container">
		<select name="optgroup-and-placeholder" id="optgroup-and-placeholder" data-nstest-native-menu="false">
			<option>Choose shipping method</option>
			<optgroup label="USPS">
				<option value="standard" selected>Standard: 7 day</option>
				<option value="rush">Rush: 3 days</option>
				<option value="express">Express: next day</option>
				<option value="overnight">Overnight</option>
			</optgroup>
			<optgroup label="FedEx">
				<option value="firstOvernight">First Overnight</option>
				<option value="expressSaver">Express Saver</option>
				<option value="ground">Ground</option>
			</optgroup>
		</select>
	</div>

	<select name="select-disabled-enhancetest" id="select-disabled-enhancetest" disabled="disabled" data-nstest-native-menu="false">
		<option value="overnight">disabled enhance test</option>
	</select>

	<select name="select-preserve-option-class" id="select-preserve-option-class">
		<option value="standard" class="foo" selected>Standard: 7 day</option>
		<option value="rush">Rush: 3 days</option>
		<option value="express">Express: next day</option>
		<option value="overnight">Overnight</option>
	</select>

	<select name="select-preserve-option-class-multiple" id="select-preserve-option-class-multiple" multiple>
		<option value="standard" class="foo" selected>Standard: 7 day</option>
		<option value="rush">Rush: 3 days</option>
		<option value="express">Express: next day</option>
		<option value="overnight">Overnight</option>
	</select>

	<select name="select-aggregate-option-text" id="select-aggregate-option-text" multiple>
		<option value="standard" selected>Standard: 7 day</option>
		<option value="rush" selected>Rush: 3 days</option>
		<option value="express">Express: next day</option>
		<option value="overnight">Overnight</option>
	</select>

	<select name="test-placeholder-update" id="test-placeholder-update" data-nstest-native-menu="false">
		<option>Placeholder</option>
		<option value="standard">Standard: 7 day</option>
		<option value="rush">Rush: 3 days</option>
		<option value="express">Express: next day</option>
		<option value="overnight">Overnight</option>
	</select>

	<select name="select-default-option-text" id="select-default-option-text">
		<option value="standard">Standard: 7 day</option>
		<option value="rush">Rush: 3 days</option>
		<option value="express">Express: next day</option>
		<option value="overnight">Overnight</option>
	</select>
</div>

<div data-nstest-role="page" id="destroyTest">
</div>

<div data-nstest-role="page" id="destroyTestCustom">
</div>

<div id="enhancetest">
	<select name="select-enhancetest" id="select-enhancetest">
		<option value="standard">Standard: 7 day</option>
		<option value="rush">Rush: 3 days</option>
		<option value="express">Express: next day</option>
		<option value="overnight">Overnight</option>
	</select>
</div>

</body>
</html>
